ed24c9b3960bd61206e614a2f9d68323d14a8632,java/java-impl/src/com/intellij/codeInsight/daemon/impl/analysis/AnnotationsHighlightUtil.java,AnnotationsHighlightUtil,checkNameValuePair,#PsiNameValuePair#,48

Before Change


    if (method == null) {
      if (pair.getName() != null) {
        String description = JavaErrorMessages.message("annotation.unknown.method", ref.getCanonicalText());
        return HighlightInfo.createHighlightInfo(HighlightInfoType.WRONG_REF, ref.getElement(), description);
      }
      else {
        String description = JavaErrorMessages.message("annotation.missing.method", ref.getCanonicalText());

After Change


    if (method == null) {
      if (pair.getName() != null) {
        final String description = JavaErrorMessages.message("annotation.unknown.method", ref.getCanonicalText());
        final HighlightInfo highlightInfo = HighlightInfo.createHighlightInfo(HighlightInfoType.WRONG_REF, ref.getElement(), description);
        QuickFixAction.registerQuickFixAction(highlightInfo, new CreateAnnotationMethodFromUsageFix(pair));
        return highlightInfo;
      }
      else {
        String description = JavaErrorMessages.message("annotation.missing.method", ref.getCanonicalText());